package com.example.demo.mapper;

import com.example.demo.domain.entity.VojObjectiveQuestion;
import com.example.demo.domain.exam.Paging;
import com.example.demo.domain.exam.condition.VojObjectiveQuestionCondition;
import com.example.demo.dto.VojObjectiveQuestionsDto;
import com.example.demo.param.voj.VojObjectiveQuestionsListParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface VojObjectiveQuestionMapper extends EasyBaseMapper<VojObjectiveQuestion> {

    List<VojObjectiveQuestion> page(@Param("c") VojObjectiveQuestionCondition condition, @Param("p") Paging paging);

    List<VojObjectiveQuestion> getByIds(@Param("ids") List<Long> ids);

    List<VojObjectiveQuestion> getByIdsNoAnswer(@Param("list") List<Long> ids);

    /**
     * 查询客观题
     * @param param
     * @param companyId
     * @return
     */
    List<VojObjectiveQuestionsDto> list(@Param("param") VojObjectiveQuestionsListParam param,
                                        @Param("companyId") Long companyId,
                                        @Param("offset") Long offset);

    Integer countList(@Param("param") VojObjectiveQuestionsListParam param,
                      @Param("companyId") Long companyId);

    List<VojObjectiveQuestionsDto> getProblemByIds(@Param("ids") List<Long> ids);

    List<VojObjectiveQuestionsDto> getObjectiveByRandom(@Param("limit") Integer limit);

    void modifyId(Long id);
}
